<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>代码助手</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" type="text/css" href="easyui/themes/gray/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css"/>
    <script src="easyui/jquery.min.js"></script>
    <script src="easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js"></script>
    <script>
        function addTab(title, url) {
            if ($('#mainTabs').tabs('exists', title)) {
                $('#mainTabs').tabs('select', title);
            } else {
                var content = '<iframe  scrolling="auto" frameborder="0"  src="' + url + '" style="width:100%;height:99%;"></iframe>';
                $('#mainTabs').tabs('add', {
                    title: title,
                    content: content,
                    closable: true
                });
            }
        }

        function clickTree(node) {
            if ($(this).tree('isLeaf', node.target)) {
                addTab(node.text, node.attributes.url);
            } else {
                $(this).tree('toggle', node.target);
            }
        }

    </script>
    <style type="text/css">
        #topbar {
            padding: 0 5px;
        }

        #topbar-system {
            padding-top: 4px;
        }
    </style>
</head>
<body class="easyui-layout">
<div data-options="region:'west',collapsible:false,iconCls:'fa fa-leaf'" style="width: 200px;">
    <div id="aa" class="easyui-accordion" data-options="fit:true">
        <div style="overflow: auto; padding: 5px;" iconCls="fa fa-users">
            <ul class="easyui-tree" data-options="onClick:clickTree">
                <li data-options="attributes:{'url':'generator.html'}"><span>生成代码</span></li>
                <li data-options="attributes:{'url':'config.html'}"><span>数据源设置</span></li>
                <li data-options="attributes:{'url':'html/signin_list.html'}"><span>关于</span></li>
            </ul>
        </div>
    </div>
</div>
<div data-options="region:'center',collapsible:false">
    <div id="mainTabs" class="easyui-tabs" data-options="fit:true,narrow:true"></div>
</div>
</body>
</html>